package com.semidata.rtd.engine.dynamic;

import javax.tools.FileObject;
import javax.tools.ForwardingJavaFileManager;
import javax.tools.JavaFileObject.Kind;
import javax.tools.StandardJavaFileManager;

public class MemoryFileManager extends ForwardingJavaFileManager<StandardJavaFileManager> {
	private ClassObjectInMemory classObject = null;
	

	public MemoryFileManager(StandardJavaFileManager fileManager) {
		super(fileManager);
	}

	@Override
	public ClassObjectInMemory getJavaFileForOutput(Location location,
			String name, Kind kind, FileObject sibling) {
	
		classObject = new ClassObjectInMemory(name);
		return classObject;
	}
	
    public ClassObjectInMemory getClassObject() {
	    return classObject;
    }
}
